package com.lkd.http.controller;

import com.lkd.entity.ChannelEntity;
import com.lkd.http.controller.vo.ChannelConfigReq;
import com.lkd.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/channel")
public class ChannelController {

    @Autowired
    private ChannelService channelService;

    //获取售货机的货道
    @GetMapping("/channelList/{innerCode}")
    public List<ChannelEntity> channelListByInnerCode(@PathVariable String innerCode){
        return channelService.channelListByInnerCode(innerCode);
    }

    //给货道配置商品
    @PutMapping("/channelConfig")
    public boolean channelConfig(@RequestBody ChannelConfigReq channelConfigReq){
        return channelService.channelConfig(channelConfigReq);
    }


}
